package com.tongtech.system.domain;

import com.tongtech.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.List;

/**
 * 文件表 file
 *
 * @author xingyc
 */
public class File extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 创建人的用户id */
    private Long userId;

    /** 创建人的部门id */
    private Long deptId;

    /** 文件id */
    private Long fileId;

    /** 加密后的文件id */
    private String fileIdStr;

    /** 父文件夹id */
    private Long parentId;

    private List<FileParentIdMapping> parentIdMappings;

    private Long mappingId;

    /** 文件类型 0-文件 1-目录 */
    private Byte fileType;

    /** 文件名称 */
    private String fileName;

    /** 文件排序 */
    private Integer orderNum;

    /** 权限 0-私有 1-公开 */
    private String permission;

    /** 是否审核 0-未审核 1-已审核 */
    private String auditStatus;

    /** 描述 */
    private String desc;

    /** 文件祖级列表 */
    private String ancestors;

    /** 相对地址 */
    private String url;

    /** md5 */
    private String md5;

    /** 工作空间 0-个人 2-共享 */
    private Byte workspace;

    private List<File> children;

    /** 文件信息状态:0-正常,1-停用 */
    private String status;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public Long getFileId() {
        return fileId;
    }

    public void setFileId(Long fileId) {
        this.fileId = fileId;
    }

    public String getFileIdStr() {
        return fileIdStr;
    }

    public void setFileIdStr(String fileIdStr) {
        this.fileIdStr = fileIdStr;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Long getMappingId() {
        return mappingId;
    }

    public void setMappingId(Long mappingId) {
        this.mappingId = mappingId;
    }

    public Byte getFileType() {
        return fileType;
    }

    public void setFileType(Byte fileType) {
        this.fileType = fileType;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public Integer getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
    }

    public String getPermission() {
        return permission;
    }

    public void setPermission(String permission) {
        this.permission = permission;
    }

    public String getAuditStatus() {
        return auditStatus;
    }

    public void setAuditStatus(String auditStatus) {
        this.auditStatus = auditStatus;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getAncestors() {
        return ancestors;
    }

    public void setAncestors(String ancestors) {
        this.ancestors = ancestors;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getMd5() {
        return md5;
    }

    public void setMd5(String md5) {
        this.md5 = md5;
    }

    public Byte getWorkspace() {
        return workspace;
    }

    public void setWorkspace(Byte workspace) {
        this.workspace = workspace;
    }

    public List<File> getChildren() {
        return children;
    }

    public void setChildren(List<File> children) {
        this.children = children;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("fileId", getFileId())
            .append("parentId", getParentId())
            .append("mappingId", getMappingId())
            .append("fileType", getFileType())
            .append("fileName", getFileName())
            .append("orderNum", getOrderNum())
            .append("permission", getPermission())
            .append("auditStatus", getAuditStatus())
            .append("desc", getDesc())
            .append("url", getUrl())
            .append("ancestors", getAncestors())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
